Conventionally, in accordance with an international standard video coding method, such as MPEG or ITU-T H.26x, an inputted video frame is divided into macroblocks each of which consists of a 16×16-pixel block, a motion-compensated prediction is carried out on each macroblock, and, after that, orthogonal transformation and quantization are carried out on a prediction error signal in units of a block in order to compress the information about the inputted video frame. A problem with such an international standard video coding method is, however, that as the compression ratio becomes high, the compression efficiency is reduced due to reduction in the quality of a prediction reference image which is used when carrying out the motion-compensated prediction. To solve this problem, in accordance with an MPEG-4 AVC/H.264 coding method (refer to nonpatent reference 1), a block distortion occurring in a prediction reference image through quantization of orthogonal transformation coefficients is removed by carrying out an in-loop blocking filtering process.
FIG. 16 is a block diagram showing an image coding device disclosed by nonpatent reference 1. In this image coding device, when receiving an image signal which is a target to be coded, a block dividing part 101 divides the image signal into image signals about macroblocks, and outputs the image signal about each of the macroblocks as a divided image signal to a predicting part 102. When receiving the divided image signal from the block dividing part 101, the predicting part 102 carries out an intra-frame or inter-frame prediction on an image signal of each color component in each of the macroblocks to calculate a prediction difference signal.
Particularly, when carrying out an inter-frame motion-compensated prediction on the image signal of each color component, the predicting part searches through each macroblock itself or each of subblocks into which each macroblock is divided more finely for a motion vector. The predicting part then carries out a motion-compensated prediction on a reference image signal stored in a memory 107 by using the motion vector to generate a motion-compensated prediction image, and calculates a prediction difference signal by acquiring the difference between a prediction signal showing the motion-compensated prediction image and the divided image signal. The predicting part 102 also outputs parameters for prediction signal generation which the predicting part determines when acquiring the prediction signal to a variable length coding part 108. For example, the parameters for prediction signal generation includes information such as a motion vector showing an inter-frame motion amount.
When receiving the prediction difference signal from the predicting part 102, a compressing part 103 removes a signal correlation from the prediction difference signal by carrying out a DCT (discrete cosine transform) process on the prediction difference signal, and, after that, acquires compressed data by quantizing the prediction difference signal from which the signal correlation is removed. When receiving the compressed data from the compressing part 103, a local decoding part 104 inverse-quantizes the compressed data and carries out an inverse DCT process on the compressed data inverse-quantized thereby, and calculates a prediction difference signal corresponding to the prediction difference signal outputted from the predicting part 102.
When receiving the prediction difference signal from the local decoding part 104, an adder 105 adds the prediction difference signal and the prediction signal outputted from the predicting part 102 to generate a local decoded image. A loop filter 106 removes a block distortion piggybacked onto a local decoded image signal showing the local decoded image generated by the adder 105, and stores the local decoded image signal from which the distortion is removed as a reference image signal in the memory 107.
When receiving the compressed data from the compressing part 103, the variable length coding part 108 entropy-encodes the compressed data and outputs a bitstream which is the coded result. When outputting the bitstream, the variable length coding part 108 multiplexes the parameters for prediction signal generation outputted from the predicting part 102 into the bitstream and outputs this bitstream.
According to a method disclosed by nonpatent reference 1, the loop filter 106 determines a smoothing intensity (filter intensity) for each neighboring pixel at a block boundary of DCT on the basis of information including the roughness of the quantization, the coding mode, the degree of variation in the motion vector, etc., and carries out a filtering process on the local decoded image so as to provide a reduction in a distortion (block distortion) occurring at a block boundary. As a result, the quality of the reference image signal can be improved, and the efficiency of the motion-compensated prediction in subsequent coding can be improved.